<div class="box_paging">
    <a href="javascript:void(0);" onclick="submitListRequest(1)"><i class="fa fa-step-backward"></i></a>
    <?php if(($i_startingIndex -1) >= 1) echo ".... ";?>
    <?php for ($i = $i_startingIndex; $i <= $i_endingIndex; $i++) {?>
    <a 
        href    = "javascript:void(0);"
        <?php 
        if ( $i == $i_currentPage ) {
            echo "class = 'selected_page'";
        } else {
            echo "onclick = 'submitListRequest($i)'";
        }
        ?>
    ><?=$i;?></a>
    <?php }?>
    <?php if(($i_endingIndex +1) <= $i_totalPage) echo " ....";?>
    <a href="javascript:void(0);" onclick="submitListRequest(<?=$i_totalPage;?>)"><i class="fa fa-step-forward"></i></a>
</div>